package com.sun.jdk.fun;

import java.util.function.Function;

public class FunctionTest {

    public static void main(String[] args) {
        
        int result = test("666", (msg) -> {
            return Integer.parseInt(msg);
        });
        System.out.println(result+1);
    }
    
    public static int test(String numStr,Function<String,Integer> function){
        Integer result = function.apply(numStr);
        return result;
    }
}
